﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using MongoDB.Bson;
using MongoDB.Driver;
using ValuationResource;
using ValuationLogic;
using System.IO;
using System.Text;
namespace ValuationModel
{
    public class UserValidation
    {
        public bool userExistence(string userName)
        {
            bool exists;
            string myPath = @"c:\" + userName + ".txt";
            exists = System.IO.File.Exists(myPath);
            return exists;
        }

        public bool addUser(User user)
        {
            if (userExistence(user.name))
                return false;
            else
            {
                string fileName = "c:\\" + user.name + ".txt";
                StreamReader sr = new StreamReader(fileName, Encoding.Default);
                return true;
            }
        }
    }
}
